package com.qpf.mycms.api.abstracts;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
public abstract class BaseEntity implements Serializable {
    /**
     * 扩展字段
     */
    private Object extra;

    /**
     * 备注
     */
    private String remark;
    /**
     * 用户来源
     */
    private String createSource;
    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    /**
     * 创建人
     */
    private Long createUser;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 更新人
     */
    private Long updateUser;

    /**
     * 删除时间
     */
    private Date deleteTime;
    @TableLogic
    private Integer delFlag;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public interface Insert{};
    public interface Update{};
    public interface Delete{};
    public interface Select{};
}
